#########################################################################
# File Name: fimage.sh
# Author: zewen
# mail: zewen.zhu@telink.com
# Created Time: Wed 21 Jun 2017 11:38:58 AM CST
#########################################################################
#!/bin/bash

echo "warning: this is only for microSD is mount as sdc!!!"

echo "please input password:"
sudo umount /dev/sdc1

sleep 0.5
echo flash image is on going...
sudo dd if=./target/LibreELEC-Khadas_Vim.aarch64-7.0.2.img of=/dev/sdc bs=4M && sync

sleep 1
sudo eject /dev/sdc

sleep 0.5
echo image flash OK!!!
